<?php 
//get library
eval ("?>$library");
?>    	            

            <div class="container">            	                
                <div class="row-fluid">

                    <!-- main content
                    ================================================== -->
                    <div id="mainContent" class="span8">
                        <div id="mainContent_inner">                                                	
                        	<h1>Authors listing</h1>
                            <hr />
                            
                            <!-- author listing
                    		================================================== -->        
                            <div class="authorListing">  
                                <div class="row-fluid">
                                	<?php
                                	$count = 0; 
                                	foreach ($authors as $key => $author) {
                                		if ($count > 0 && $count%2==0) {
                                	?>
                                	</div>
                                	<div class="row-fluid">
                                	<?php		
                                		}
                                	?>
                                    <div class="span6">
                                        <div class="row-fluid">
                                            <div class="span3">
                                            	<a href="/author/<?=$author->getId()?>" class="thumbnail">
                                            	<?php
                                            	if (isset($images[$author->getId()])) { 
                                            	?>
                                            		<img src="<?=$images[$author->getId()]?>=s120-c" />
                                            	<?php 
                                            	} else {
                                            	?>
                                            		<img src="<?=$baseUrl?>images/icon-author.jpg" />
                                            	<?php
                                            	} 
                                            	?>
                                            	</a>
                                            </div>
                                            <div class="span9"><h4 class="authorName"><a href="/author/<?=$author->getId()?>"><?=$author->getName()?></a></h4></div>
                                        </div>
                                    </div>
                                    <?php 
                                    	$count ++;
                                	}
                                    ?>
                                    
                                </div>
                            </div>
                            
                            <hr />
                            
                            <!-- Pagination
        					================================================== -->
                            <div class="pagination pagination-centered">
                                <ul>
                                    <?php 
									$range = $paginator->getRangePage();
									?>
									<?php 
									if ($prevPage) {
									?>
                                	<li><a href="<?=$paginator->getPrev() ?>">Prev</a></li>
									<?php 
									}
									if ($nextPage || $prevPage) {
										for ($i = 0; $i < count($range); $i++) {
									 ?>
                                    <li class="<?=$range[$i] == $pages ? "disabled" : ""?>"><a href="<?=$paginator->getPage($range[$i])?>"><?=$range[$i] ?></a></li>
                                    <?php 
										}
									}
									if ($nextPage) {
									?>
									<li><a href="<?=$paginator->getNext() ?>">Next</a></li>
									<?php } ?>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <!-- sidebar
                    ================================================== -->
                    <div class="span4">
                        <aside>
                        
                        	<!-- Search
        					================================================== -->
                        	<div class="module-2">
                                <h3 class="title">Search this site</h3>
                                <div class="moduleContent">
                                    <form method="get" action="/search" class="form-inline">
                                    	<input type="text" placeholder="Search article" class="" name="q"  />
                                        <button type="submit" class="btn">Search</button>
                                    </form>
                                </div>
                            </div>
                            
                            <!-- Adv
        					================================================== -->
                            <div class="module-2">                                
                                <div class="moduleContent adv-sidebar">
                                	<?=$ads->getAds300x250()?>
                                </div>
                            </div>
                            
                            <!-- Recent article
        					================================================== -->
                            <div class="module-6">
                                <h3 class="title">Recent article view</h3>
                                <div class="moduleContent">
                                    <ul class="listingStyle" itemscope itemtype="http://schema.org/ItemList">
                                    	<?php 
                                    	foreach ($lastestArticles as $key => $article) {
                                    	?>
                                    	<li itemscope itemtype="http://schema.org/Article" itemprop="itemListElement">
                                        	<h5 itemprop="name" class="articleTitle"><a href="/article/<?=$article->getAlias()?>" itemprop="url"><?=$article->getTitle()?></a></h5>
                                            <span itemprop="dateCreated"><?=date("M, d Y", $article->getCreated())?></span>
                                        </li>
                                        <?php 
                                    	}
                                        ?>
                                    </ul>
                                </div>
                            </div>
                            
                            <!-- Categories
        					================================================== -->
                            <div class="module-6">
                                <h3 class="title">Categories</h3>
                                <div class="moduleContent">
                                    <ul class="listingStyle" itemscope itemtype="http://schema.org/ItemList">
                                    	<?php
                                    	foreach ($lstCategories as $key => $category) { 
                                    	?>
                                    	<li itemprop="itemListElement"><i class="icon-share-alt"></i> <a itemprop="url" href="/category/<?=$category->getAlias()?>"><span itemprop="name"><?=$category->getName()?></span></a></li>
                                    	<?php } ?>
                                    </ul>
                                </div>
                            </div>
                            
                            <!-- Tags
        					================================================== -->
                            <div class="module-2">
                            	<h3 class="title">Tags</h3>                            
                                <div class="moduleContent" itemscope itemtype="http://schema.org/CreativeWork">
                                	<?php 
                                	foreach ($tags as $key => $tag) {
                                	?>
                                    <a href="/tag/<?=urlencode($tag)?>" class="label label-info" itemprop="keywords"><?=$tag?></a>
                                    <?php 
                                	}
                                    ?>
                                </div>
                            </div>
                        </aside>
                    </div>
                </div>
            </div>
